// 类数组
let obj = {
    0: "a",
    1: "b",
    length: 2
};
// 类数组转换成数组 arguments HTMLCollection
let res = Array.from(obj);
console.log(res);

function fn() {
    //console.log(arguments);
    //let res = Array.prototype.slice.call(arguments,0);
    //let res = Array.from(arguments);
    let res = [...arguments]; 
    let res2 = [...obj]; //报错 需要提供迭代器
    console.log(res);
    console.log(res2);
}

fn(1,2,3);
 